home *** CD-ROM | disk | FTP | other *** search
/ PD Collection CD 1 / PD Collection CD 1.iso / textual / tex / files / !tex / TeXsource / beebe / h / setrule < prev    next >
Encoding:
Text File  |  1990-05-18  |  915 b   |  35 lines

  1. /* -*-C-*- setrule.h */
  2. /*-->setrule*/
  3. /**********************************************************************/
  4. /****************************** setrule *******************************/
  5. /**********************************************************************/
  6.  
  7. #ifdef __STDC__
  8. void
  9. setrule(register UNSIGN32 height, register UNSIGN32 width, register BOOLEAN update_h)
  10. #else
  11. void
  12. setrule(height, width, update_h)
  13. register UNSIGN32 height, width;
  14. register BOOLEAN update_h;
  15. #endif
  16. {   /* draw a rule with bottom left corner at (h,v) */
  17.  
  18.     if ((height > 0) && (width > 0))        /* non-empty rule */
  19.  
  20. #if    BBNBITGRAPH
  21.     fillrect(hh+xscreen, YSIZE-vv+yscreen,
  22.         rulepxl(width,conv)  ,  rulepxl(height,conv));
  23. #else
  24.     fillrect(hh, YSIZE-vv,
  25.         rulepxl(width,conv), rulepxl(height,conv));
  26. #endif
  27.  
  28.     if (update_h)
  29.     {
  30.     h += (INT32)width;
  31.     hh += rulepxl(width, conv);
  32.     hh = fixpos(hh-lmargin,h,conv) + lmargin;
  33.     }
  34. }
  35.